/*
All rights reserved, Biometric Computing Center, HIT
*/
#ifndef _PALMDLL_H_
#define _PALMDLL_H_
#include <math.h>
#include <stdlib.h>
//#include "stdafx.h"

extern int g_SearchStart;

#ifdef _WIN32
typedef unsigned __int64 UINT64;
#else
typedef unsigned long long UINT64;
#endif
typedef unsigned int Bit32;
typedef struct
{
	Bit32 BitPlane_0[32];
	Bit32 BitPlane_1[32];
	Bit32 BitPlane_2[32];
	Bit32 BitPlane_M[32];
} printFeature;
#define BOUNDARYPOINTS 500
extern int ImageWidth;
extern int ImageHeight;
extern int lastP1Index;
extern int lastP2Index;
extern int holeList[2][BOUNDARYPOINTS][2];
extern int HoleNumber[2];
extern int edge[7];

void FillGaborFilterAngle(float fSigma, float f2Delta, float fAngle, int *pFilter);
void FillGaborFilter(float fSigma, float f2Delta);
int Lnpreprocessing(unsigned char *Image, unsigned char *ThresholdFlag, unsigned char *roiImg, int Sx[4], int Sy[4]);
int LnKeyPointDetection(int Boundary[2][BOUNDARYPOINTS][2], int HoleNumber[2], int Sx[4], int Sy[4]);
void ROIExtraction(unsigned char *Image, unsigned char *SubImage, int Sx[4], int Sy[4]);
void FeatureExtractionPrint(unsigned char *pbyImage, printFeature *pF2D);
double MatchPrint(printFeature *pF2D1, printFeature *pF2D2);
void SetImageSize(int width, int height);
#endif
